\(\int \sin ^3(a+b x) \tan ^2(a+b x) \, dx\) [106]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-2)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 37 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=\frac {2 \cos (a+b x)}{b}-\frac {\cos ^3(a+b x)}{3 b}+\frac {\sec (a+b x)}{b} \]

[Out]

2*cos(b*x+a)/b-1/3*cos(b*x+a)^3/b+sec(b*x+a)/b

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2670, 276} \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=-\frac {\cos ^3(a+b x)}{3 b}+\frac {2 \cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \]

[In]

Int[Sin[a + b*x]^3*Tan[a + b*x]^2,x]

[Out]

(2*Cos[a + b*x])/b - Cos[a + b*x]^3/(3*b) + Sec[a + b*x]/b

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2670

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^2} \, dx,x,\cos (a+b x)\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \left (-2+\frac {1}{x^2}+x^2\right ) \, dx,x,\cos (a+b x)\right )}{b} \\ & = \frac {2 \cos (a+b x)}{b}-\frac {\cos ^3(a+b x)}{3 b}+\frac {\sec (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.05 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=\frac {7 \cos (a+b x)}{4 b}-\frac {\cos (3 (a+b x))}{12 b}+\frac {\sec (a+b x)}{b} \]

[In]

Integrate[Sin[a + b*x]^3*Tan[a + b*x]^2,x]

[Out]

(7*Cos[a + b*x])/(4*b) - Cos[3*(a + b*x)]/(12*b) + Sec[a + b*x]/b

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.24

method result size
parallelrisch \(\frac {20 \cos \left (2 b x +2 a \right )+45-\cos \left (4 b x +4 a \right )+64 \cos \left (b x +a \right )}{24 b \cos \left (b x +a \right )}\) \(46\)
derivativedivides \(\frac {\frac {\sin ^{6}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (\frac {8}{3}+\sin ^{4}\left (b x +a \right )+\frac {4 \left (\sin ^{2}\left (b x +a \right )\right )}{3}\right ) \cos \left (b x +a \right )}{b}\) \(50\)
default \(\frac {\frac {\sin ^{6}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (\frac {8}{3}+\sin ^{4}\left (b x +a \right )+\frac {4 \left (\sin ^{2}\left (b x +a \right )\right )}{3}\right ) \cos \left (b x +a \right )}{b}\) \(50\)
norman \(\frac {-\frac {16}{3 b}-\frac {32 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}\) \(54\)
risch \(\frac {7 \,{\mathrm e}^{i \left (b x +a \right )}}{8 b}+\frac {7 \,{\mathrm e}^{-i \left (b x +a \right )}}{8 b}+\frac {2 \,{\mathrm e}^{i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}-\frac {\cos \left (3 b x +3 a \right )}{12 b}\) \(71\)

[In]

int(sec(b*x+a)^2*sin(b*x+a)^5,x,method=_RETURNVERBOSE)

[Out]

1/24/b*(20*cos(2*b*x+2*a)+45-cos(4*b*x+4*a)+64*cos(b*x+a))/cos(b*x+a)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.89 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=-\frac {\cos \left (b x + a\right )^{4} - 6 \, \cos \left (b x + a\right )^{2} - 3}{3 \, b \cos \left (b x + a\right )} \]

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^5,x, algorithm="fricas")

[Out]

-1/3*(cos(b*x + a)^4 - 6*cos(b*x + a)^2 - 3)/(b*cos(b*x + a))

Sympy [F(-2)]

Exception generated. \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=\text {Exception raised: HeuristicGCDFailed} \]

[In]

integrate(sec(b*x+a)**2*sin(b*x+a)**5,x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.86 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=-\frac {\cos \left (b x + a\right )^{3} - \frac {3}{\cos \left (b x + a\right )} - 6 \, \cos \left (b x + a\right )}{3 \, b} \]

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^5,x, algorithm="maxima")

[Out]

-1/3*(cos(b*x + a)^3 - 3/cos(b*x + a) - 6*cos(b*x + a))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (35) = 70\).

Time = 0.32 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.68 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=\frac {2 \, {\left (\frac {3}{\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1} + \frac {\frac {12 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac {3 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 5}{{\left (\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 1\right )}^{3}}\right )}}{3 \, b} \]

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^5,x, algorithm="giac")

[Out]

2/3*(3/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1) + (12*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 3*(cos(b*x +
a) - 1)^2/(cos(b*x + a) + 1)^2 - 5)/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 1)^3)/b

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.84 \[ \int \sin ^3(a+b x) \tan ^2(a+b x) \, dx=-\frac {{\left (\cos \left (a+b\,x\right )+1\right )}^3\,\left (\cos \left (a+b\,x\right )-3\right )}{3\,b\,\cos \left (a+b\,x\right )} \]

[In]

int(sin(a + b*x)^5/cos(a + b*x)^2,x)

[Out]

-((cos(a + b*x) + 1)^3*(cos(a + b*x) - 3))/(3*b*cos(a + b*x))